package vip.denglei.company.controller.app;

import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import vip.denglei.company.service.app.AppAdoptionActivitiesService;
import vip.denglei.company.util.HttpResult;

import javax.annotation.Resource;

/**
 * 认养活动(app_adoption_activities)表控制层
 *
 * @author xxxxx
 */
@RestController
@RequestMapping("/appAdoptionActivities")
@Slf4j
public class AppAdoptionActivitiesController {
    /**
     * 服务对象
     */
    @Resource
    private AppAdoptionActivitiesService appAdoptionActivitiesService;

    /**
     * @param adoptionActivitiesId
     * @param userId
     * @return
     */
    @GetMapping("query/adoptionActivities/{adoptionActivitiesId}/{userId}")
    public HttpResult queryAppAdoptionActivitiesByUserId(@PathVariable Integer adoptionActivitiesId, @PathVariable String userId) {
        log.info("AppAdoptionActivitiesController queryAppAdoptionActivitiesByUserId 参数adoptionActivitiesId:{},userId:{}", adoptionActivitiesId, userId);

        return appAdoptionActivitiesService.queryAppAdoptionActivitiesByUserId(adoptionActivitiesId, userId);
    }


}
